package o;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.security.MessageDigest;

public final class sb<T> {
    private static final a<Object> ˋ = new a<Object>() {
        public void ˊ(@NonNull byte[] bArr, @NonNull Object obj, @NonNull MessageDigest messageDigest) {
        }
    };
    private final String ˊ;
    private final T ˎ;
    private final a<T> ˏ;
    private volatile byte[] ॱ;

    public interface a<T> {
        void ˊ(@NonNull byte[] bArr, @NonNull T t, @NonNull MessageDigest messageDigest);
    }

    @NonNull
    public static <T> sb<T> ˏ(@NonNull String str) {
        return new sb(str, null, ॱ());
    }

    @NonNull
    public static <T> sb<T> ˎ(@NonNull String str, @NonNull T t) {
        return new sb(str, t, ॱ());
    }

    @NonNull
    public static <T> sb<T> ˋ(@NonNull String str, @Nullable T t, @NonNull a<T> aVar) {
        return new sb(str, t, aVar);
    }

    private sb(@NonNull String str, @Nullable T t, @NonNull a<T> aVar) {
        this.ˊ = aas.ˏ(str);
        this.ˎ = t;
        this.ˏ = (a) aas.ˎ(aVar);
    }

    @Nullable
    public T ˎ() {
        return this.ˎ;
    }

    public void ˎ(@NonNull T t, @NonNull MessageDigest messageDigest) {
        this.ˏ.ˊ(ˋ(), t, messageDigest);
    }

    @NonNull
    private byte[] ˋ() {
        if (this.ॱ == null) {
            this.ॱ = this.ˊ.getBytes(sa.ˏ);
        }
        return this.ॱ;
    }

    public boolean equals(Object obj) {
        if (!(obj instanceof sb)) {
            return false;
        }
        return this.ˊ.equals(((sb) obj).ˊ);
    }

    public int hashCode() {
        return this.ˊ.hashCode();
    }

    @NonNull
    private static <T> a<T> ॱ() {
        return ˋ;
    }

    public String toString() {
        return "Option{key='" + this.ˊ + '\'' + '}';
    }
}
